  // Do file that examines if there is any difference in "performance" between
  // candidates depending on ethnic concentration. 
  // Table A9.
  //
  // Last changed: 2020-04-02 (KOL)
  
  capture log close
  local output "C:\Userdata\Shared\Dofiles\DoAnalysis\PlacementCandidacy"
  log using "`output'\Output\TableA9.log", replace text
   
  use "E:\ProjData\PlacementCandidacy\utp-DataMainSample.dta", clear
  
  local controls1 "InvAr IFAUkod Ar FodelseAr"
  local controls2 "Kvinna Gift_InvAr Barn0_15_InvAr"
  local controls3 "LoneInk UtbAr Sysselsatt" 
  
  reghdfe UtbAr_Inv `controls2' (logpEnklavVuxen = logpEnklavVuxenInvAr) if Nominerad == 100, absorb(InKommun `controls1') cluster(InKommun) stages(first) old
  eststo c1
  
  reghdfe Vald (logpEnklavVuxen = logpEnklavVuxenInvAr) if Nominerad == 100, absorb(InKommun `controls1') cluster(InKommun) stages(first) old
  eststo c2
  
  reghdfe minListNr (logpEnklavVuxen = logpEnklavVuxenInvAr) if Nominerad == 100, absorb(InKommun `controls1') cluster(InKommun) stages(first) old
  eststo c3
  
  reghdfe maxPersRost (logpEnklavVuxen = logpEnklavVuxenInvAr) if Nominerad == 100, absorb(InKommun `controls1') cluster(InKommun) stages(first) old
  eststo c4 
  
  esttab c1 c2 c3 c4 using "`output'\Output\TableA9.rtf", keep(`controls2' logpEnklavVuxen) replace star(* .1 ** .05 *** .01) b(3) se(3) 
  log close
